Aspects of the present invention relate to garbage collection in computer programming. In particular, the present invention relates to providing garbage collection in an in-memory replication system.
In order to provide high availability and failover of the memory, an application server may provide an in-memory replication mechanism. The basic function of in-memory replication is to back up multiple copies of data stored by a first node server memory in other node servers, wherein the current data in operation becomes primary data, and the backup copies of data become replica data. When the primary data is temporarily damaged due to some reason, e.g. the currently serving server is dead, the replica data will be used as the primary data, and the task of the primary server can be taken over in real time.